using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.SYS
{
    [Table("sys_sc_roles"), DataContract]
    public class Role
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "RoleId", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("role_seq")]
        public int RoleId { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("role_name")]
        public string RoleName { get; set; }

        [DataMember, Display(Name = "System", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("system")]
        public string System { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("created_by")]
        public int? CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("updated_by")]
        public int? UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.ScRolesResource))]
        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual ICollection<SYS.UserRole> UserRole { get; set; }

        [DataMember]
        public virtual ICollection<SYS.Permission> Permission { get; set; }

    }
}
